Micron Document
🎖️GitЯра🎖️

Node / meshtastic / Meshtastic-Android / files / androidApp / src / fdroid / kotlin / org / meshtastic / app / analytics / FdroidPlatformAnalytics.kt

Displaying Raw • Download

androidApp/src/fdroid/kotlin/org/meshtastic/app/analytics/FdroidPlatformAnalytics.kt b8ab53e712871d076effd2defc55be720495aba5 (b8ab53e7) Text, 2.00 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.app.analytics

Tff7b72import T7ee787co.touchlab.kermit.Logger
Tff7b72import T7ee787co.touchlab.kermit.Severity
Tff7b72import T7ee787org.koin.core.annotation.Single
Tff7b72import T7ee787org.meshtastic.app.BuildConfig
Tff7b72import T7ee787org.meshtastic.core.repository.DataPair
Tff7b72import T7ee787org.meshtastic.core.repository.PlatformAnalytics

T8b949e/**
* F-Droid specific implementation of [PlatformAnalytics]. This provides no-op implementations for analytics and other
* platform services.
*/
Tf0883e@Single
Tff7b72class T56d364FdroidPlatformAnalytics Tb4b4b4: Te6edf3PlatformAnalytics Tb4b4b4{
Tff7b72init Tb4b4b4{
T8b949e// For F-Droid builds we don't initialize external analytics services.
T8b949e// Configure Kermit logging: Debug level for debug builds, Info level for release builds.
Te6edf3LoggerTb4b4b4.Te6edf3setMinSeverityTb4b4b4(Tff7b72if Tb4b4b4(Te6edf3BuildConfigTb4b4b4.Te6edf3DEBUGTb4b4b4) Te6edf3SeverityTb4b4b4.Te6edf3Debug Tff7b72else Te6edf3SeverityTb4b4b4.Te6edf3InfoTb4b4b4)
Te6edf3LoggerTb4b4b4.Te6edf3i Tb4b4b4{
Ta5d6ff"Ta5d6ffF-Droid platform no-op analytics initialized (Tffd700${Tff7b72if Tb4b4b4(Te6edf3BuildConfigTb4b4b4.Te6edf3DEBUGTb4b4b4) Ta5d6ff"Te6edf3DebugTa5d6ff" Tff7b72else Ta5d6ff"Te6edf3InfoTa5d6ff"Tffd700}Ta5d6ff logging).Ta5d6ff"
Tb4b4b4}
Tb4b4b4}

Tff7b72override Tff7b72fun Td2a8ffsetDeviceAttributesTb4b4b4(Te6edf3firmwareVersionTb4b4b4: Tffa657StringTb4b4b4, Te6edf3modelTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4{
Tff7b72if Tb4b4b4(Te6edf3BuildConfigTb4b4b4.Te6edf3DEBUGTb4b4b4) Te6edf3LoggerTb4b4b4.Te6edf3d Tb4b4b4{ Ta5d6ff"Ta5d6ffsetDeviceAttributes: firmwareVersion=Tffd700$Te6edf3firmwareVersionTa5d6ff, model=Tffd700$Te6edf3modelTa5d6ff" Tb4b4b4}
Tb4b4b4}

Tff7b72override Tff7b72val Te6edf3isPlatformServicesAvailableTb4b4b4: Tffa657Boolean
Tff7b72getTb4b4b4(Tb4b4b4) Tff7b72= Tff7b72false

Tff7b72override Tff7b72fun Td2a8fftrackTb4b4b4(Te6edf3eventTb4b4b4: Tffa657StringTb4b4b4, Tff7b72vararg Te6edf3propertiesTb4b4b4: Te6edf3DataPairTb4b4b4) Tb4b4b4{
T8b949e// No-op for F-Droid
Tb4b4b4}
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.05s